package com.tanhua.manager.controller;

import com.tanhua.manager.service.AnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AnalysisController {

    @Autowired
    private AnalysisService analysisService;


    @GetMapping(value = "/dashboard/summary",name = "概要统计")
    public ResponseEntity summary(){
        return analysisService.summary();
    }

    @GetMapping(value = "/dashboard/users",name = "新增、活跃、次日留存图表")
    public ResponseEntity users(Long sd,Long ed,Integer type){
        return analysisService.users(sd,ed,type);
    }
}
